<?php

namespace core\system;

require_once 'core/CoreBase.php';
require_once 'core/system/Session.php';

class Autoloader {

    public static $loader;

    public static function init() {
        if (self::$loader == NULL)
            self::$loader = new self();

        return self::$loader;
    }

    public function __construct() {
        spl_autoload_register(array($this, '__autoloader'));
    }

    public function __autoloader($class) {
        \core\CoreBase::import($class);
    }

}
